package com.nmsl.nurse.controller;

import com.nmsl.nurse.domain.MDepartments;
import com.nmsl.nurse.service.impl.MDepartmentsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Mdepartments")
public class MDepartmentsController {
    @Autowired
    private MDepartmentsServiceImpl mDepartmentsService;
            @RequestMapping("/selectDepartmentId")
    public MDepartments selectDepartmentId(Long id){
          return mDepartmentsService.selectByPrimaryKey(id);
            }


    @RequestMapping("/selectall")
    public List<MDepartments> selectall(){
        return mDepartmentsService.selectall();
    }
}
